package kids;

import emergent.Rule;

public class Decrease implements Rule<GameWorld, Kid> {

	@Override
	public void doAction(GameWorld world, Kid agent) {
		agent.setValue(10 - agent.getRightHandSideAgent().getValue());
	}

	@Override
	public boolean verifyGuard(GameWorld world, Kid agent) {
		return(!agent.isIncreasing() && agent.getValue()>0);
	}

}
